/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sdc.utility;

import java.io.IOException;
import java.util.Properties;

/**
 *
 * @author yokoe
 */
public class PropertyManager
{

	private static Properties properties;

	static {
		properties = new Properties();

		try
		{
			properties.load(ClassLoader.getSystemResourceAsStream("parameters.properties"));

		} catch (IOException exception)
		{
			exception.printStackTrace();
		}
	}

	public static String getValueAsString(String key){
		return properties.getProperty(key);
	}

	public static double getValueAsDouble(String key){
		return Double.parseDouble(properties.getProperty(key));
	}

        public static byte getValueAsByte(String key){
            return Byte.parseByte(properties.getProperty(key));
        }

        public static boolean getValueAsBoolean(String key){
            return Boolean.parseBoolean(properties.getProperty(key));
        }

        public static int getValueAsInteger(String key){
            return Integer.parseInt(properties.getProperty(key));
        }

        public static long getValueAsLong(String key) {
            return Long.parseLong(properties.getProperty(key));
        }
}
